{ pkgs? import <nixpkgs> {} }:

pkgs.mkShell {
  nativeBuildInputs = with pkgs; [
    pkg-config
    clang
    lld # To use lld linker
  ];
  buildInputs = with pkgs; [
    cargo
    rustc
    rustfmt
    pre-commit
    rustPackages.clippy
    alsa-lib
    udev
    #NOTE Add more deps
    vulkan-loader
    xorg.libX11
    xorg.libXrandr
    xorg.libXcursor
    xorg.libXi
  ];
  shellHook = ''
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${
      pkgs.lib.makeLibraryPath [
        pkgs.udev
        pkgs.alsaLib
        pkgs.vulkan-loader
      ]
    }"'';
  RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc;
}
